<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>

		<div id="app">
			<!-- v-on:click 给按钮绑定事件处理 -->
			{{count}}
			<button v-on:click="increase">+</button>
			<button v-on:click="decrease">-</button>
			{{message}}
			
		</div>
		
		<script>

			var app = Vue.createApp({
				data(){
					return {
						message:"Hello Vue!",
						count:1
					}
				},
				methods:{
					increase:function(){
						this.count++;
					},
					decrease:function(){
						this.count--;
					}
				},

			});

			var vm = app.mount("#app")

			
		</script>
		
	</body>
</html>
